package com.gopay.common.cps.dao.wallet.awmsg.impl;


import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.domain.log.LogSMSSend;
import com.gopay.common.domain.vs.VsValidCodeDtl;
import com.gopay.common.util.DateUtils;
import com.gopay.common.exception.GopayException;
import com.ibm.icu.text.SimpleDateFormat;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import com.gopay.common.domain.dps.WaTdCodeCtb;
import com.gopay.common.domain.dps.WaTdCodeRemind;
import com.gopay.common.cps.dao.wallet.awmsg.TdCodeRemindDao;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 二维码提醒信息DAO
 *
 * @author 邵征达
 * @2017-10-16
 */
@Repository("tdCodeRemindDAO")
public class TdCodeRemindDaoImpl extends BaseDAOImpl<WaTdCodeRemind,Integer> implements TdCodeRemindDao {

	@Override
	public WaTdCodeRemind findTdRemindByUserId(String userId) {
		String hql="from WaTdCodeRemind e where e.userId=:userId";
		Map<String,Object> param=new HashMap<String,Object>();
		param.put("userId", userId);
		List<WaTdCodeRemind> list=this.findByHql(hql,param);
		return list!=null&&list.size()>0?list.get(0):null;
	}

	@Override
	public void addWaTdCodeRemind(WaTdCodeRemind info) throws GopayException {
		super.save(info);
	}

	@Override
	public void editWaTdCodeRemind(WaTdCodeRemind info) throws GopayException {
		super.update(info);
		
	}
	
}
